/*
 ============================================================================
 Name		: InputNameDlg.cpp
 Author	  : Hou maoqing
 Version	 : 1.0
 Copyright   : Copyright (c) Hou maoqing 2008
 Description : CInputNameDlg implementation
 ============================================================================
 */

#include "InputNameDlg.h"
#include "FinancialAssistant.hrh"

#include <avkon.hrh> // EAknSoftkeyOk
#include <eikedwin.h> // CEikEdwin
#include <eiklabel.h> // CEikLabel
#include <stringloader.h> // StringLoader
#include <FinancialAssistant.rsg>

CInputNameDlg::CInputNameDlg(TDes& aName) : iName(aName)
	{

	}

TBool CInputNameDlg::OkToExitL(TInt aButtonId)
	{
	if (aButtonId == EAknSoftkeyOk)
		{
		CEikEdwin* editor = static_cast<CEikEdwin*>(ControlOrNull(EDialogInputNameEditor));
		if (editor)
			{

			editor->GetText(iName);
			}
		}
	return ETrue;
	}

/*void CInputNameDlg::PreLayoutDynInitL()
	{
	CEikLabel* label = static_cast<CEikLabel*>(ControlOrNull(EDialogInputNameLabel));
	if (label)
		{
		TBuf<30> labelText;
		labelText.Append(_L("Input     "));		
		label->SetTextL(labelText);

		}
	
	CEikEdwin* editor = static_cast<CEikEdwin*>(ControlOrNull(EDialogInputNameEditor));
	if (editor)
		{
		TBuf<30> name(_L("hello"));

		editor->SetTextL(&name);
		}
	}*/

/*TBool CInputNameDlg::RunDlgLD (TDes& aPlayerName)
	{
	CInputNameDlg* inputNameDialog = new (ELeave) CInputNameDlg(aPlayerName);
		return inputNameDialog->ExecuteLD(R_INPUT_NAME_DIALOG);
	}*/
